package com.qf.mapper;

import com.qf.entity.MallGoods;
import com.qf.entity.MallGoodsSku;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;

import java.util.List;

/*
    作者：Administrator
    时间：2021/9/27 0027 17:18
* */
public interface GoodsSkuMapper {
    @Insert("insert into mall_goods (goods_name,brand_id,caption,category1_id,category2_id,category3_id,type_template_id,price) values(#{goodsName},#{brandId},#{caption},#{category1Id},#{category2Id},#{category3Id},#{typeTemplateId},#{price})")
    @Options(useGeneratedKeys=true, keyProperty="spuId", keyColumn="spu_id")
    public int saveGoods(MallGoods goods);

    public int saveSkus(List<MallGoodsSku> mallGoodsSkuList);
}
